#include <sys_config.h>

#ifdef DVR_PVR_SUPPORT

#include <types.h>
#include <osal/osal.h>
#include <api/libc/printf.h>
#include <api/libc/string.h>
#include <hld/hld_dev.h>
#include <hld/dmx/dmx_dev.h>
#include <hld/dmx/dmx.h>
#include <hld/decv/vdec_driver.h>
#ifndef NEW_DEMO_FRAME
#include <api/libpub29/lib_hde.h>
#include <api/libpub29/lib_pub27.h>
#else
#include <api/libpub/lib_hde.h>
#endif


#include <api/libosd/osd_lib.h>

#include "osdobjs_def.h"
#include "images.id"
#include "string.id"
#include "osd_config.h"

#include "menus_root.h"

#ifndef SD_UI
#ifdef SUPPORT_CAS_A
#define PVR_HINT_L  940//920//880//966//530
#define PVR_HINT_T 110//150//68//108//30
#else
#define PVR_HINT_L 880//966//530
#define PVR_HINT_T 150//68//108//30
#endif
#define PVR_HINT_W 90
#define PVR_HINT_H 35
#else
#define PVR_HINT_L 530//966//530
#define PVR_HINT_T 30//68//108//30
#define PVR_HINT_W 60
#define PVR_HINT_H 32

#endif
#define PVR_HINT_ICON   IM_INFORMATION_REC


#define REC_HINT_STATE    	1
#define UNREC_HINT_STATE		0

extern BITMAP 		win_rec_hint_bmp;

DEF_BITMAP(win_rec_hint_bmp,NULL,NULL,C_ATTR_ACTIVE,0, \
    1,0,0,0,0, PVR_HINT_L, PVR_HINT_T, PVR_HINT_W, PVR_HINT_H, WSTL_TRANS_IX,WSTL_NOSHOW_IDX,WSTL_NOSHOW_IDX,WSTL_NOSHOW_IDX,   \
    NULL,NULL,  \
    C_ALIGN_CENTER | C_ALIGN_VCENTER, 0,0,PVR_HINT_ICON)


static BOOL cur_rec_hint_state=UNREC_HINT_STATE;	



/*******************************************************************************
* Function definition
*******************************************************************************/

/***********************************************/

BOOL GetRecHintState()
{
	return cur_rec_hint_state;
}

BOOL SetRecHintState(BOOL flag)
{
	cur_rec_hint_state = flag;
}

void ShowRecHintOSDOnOff(UINT8 flag)
{
	OBJECT_HEAD* obj;
	obj = (OBJECT_HEAD*)&win_rec_hint_bmp;

#ifdef _INVW_JUICE //v0.1.4
    if (!INVIEW_isAppBusy()) {
    INVIEW_pause();
    if(flag) {
        OSD_DrawObject(obj, C_UPDATE_ALL);
	osal_task_sleep(3000);
    }
        OSD_ClearObject(obj, 0);
    }
#else
    if(flag)
        OSD_DrawObject(obj, C_UPDATE_ALL);
    else
        OSD_ClearObject(obj, 0);
#endif
}

////////////////////////////////////////////////
#endif//#ifdef DVR_PVR_SUPPORT

